-
Notifications
You must be signed in to change notification settings - Fork 834
Enable the use of different actors in rule sets #2588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…lid of not. These change over time and we would need to carry a list in code to verify this. Do not require an actor_id on rule bypasses. Things like DeployKey do not have an id.
@kfcampbell Any chance you can have a look at this please. We would like to start making use of it but having to keep a separate copy of the provider is a pain. |
Description: "The ID of the actor that can bypass a ruleset. When `actor_type` is `OrganizationAdmin`, this should be set to `1`.", | ||
Optional: true, | ||
Default: nil, | ||
Description: "The ID of the actor that can bypass a ruleset. When `actor_type` is `OrganizationAdmin`, this should be set to `1`. Some resources such as DeployKey do not have an ID and this should be omitted.", | ||
}, | ||
"actor_type": { | ||
Type: schema.TypeString, | ||
Required: true, | ||
ValidateFunc: validation.StringInSlice([]string{"RepositoryRole", "Team", "Integration", "OrganizationAdmin"}, false), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ValidateFunc: validation.StringInSlice([]string{"RepositoryRole", "Team", "Integration", "OrganizationAdmin"}, false), | |
ValidateFunc: validation.StringInSlice([]string{"RepositoryRole", "Team", "Integration", "OrganizationAdmin", "DeployKey"}, false), |
It would be very nice to get this PR updated and merged :) |
@morfien101 should I help you out? |
I've taken the liberty to update this in #2726 |
This PR attempts to resolve an issue where the provider is not able to create bypass rules that don't use the explicit values set in this provider. The provider itself is out of date. There is no need for the provider to do the check as the API and helps will do the checks for us.
Resolves #2254
Before the change?
Users would not be able to make a bypass rule that uses something like a
DeployKey
After the change?
Users can make any bypass rule that is accepted by the API
Pull request checklist
Does this introduce a breaking change?
No breaking changes. I expect it to be fully backwards compatible with the current config in the wild.
See it working here
